	$(function(){
		var num = 0;
		var timer = null;
		var timer2 = null;
		function move(){
			num++;
			num = (num ==$(".banner-nav-wrapper .banner-nav a").length) ? 0 : num ;
			$(".slider ul li").eq(num ).fadeIn(500).siblings("li").fadeOut(500);
			$(".banner-nav-wrapper .banner-nav a").eq(num ).addClass("current").siblings("a").removeClass("current");
		}
		timer = setInterval(move,3000);
		$(".banner-nav-wrapper .banner-nav a").mouseenter(function(){
			var cthis = $(this);
			clearInterval(timer);
			timer2 = setTimeout(function(){
				
				num = cthis.index();
				$(".slider ul li").eq(num).stop().fadeIn(500).siblings("li").stop().fadeOut(500);
				$(".banner-nav-wrapper .banner-nav a").eq(num).addClass("current").siblings("a").removeClass("current");
			},200);
		});
		$(".banner-nav-wrapper .banner-nav a").mouseleave(function(){
			clearTimeout(timer2);
			timer = setInterval(move,3000);
		});

		$(".arrow a.next-btn").mouseleave(function(){
			clearTimeout(timer2);
			timer = setInterval(move,3000);
		});

		$(".arrow a.next-btn").click(function(){
			clearInterval(timer);
			clearTimeout(timer2);
			num--;
			num = (num < 0) ? $(".banner-nav-wrapper .banner-nav a").length-1 : num ;
			$(".slider ul li").eq(num ).fadeIn(500).siblings("li").fadeOut(500);
			$(".banner-nav-wrapper .banner-nav a").eq(num ).addClass("current").siblings("a").removeClass("current");
			
		});


		$(".arrow a.prev-btn").mouseleave(function(){
			clearTimeout(timer2);
			timer = setInterval(move,3000);
		});

		$(".arrow a.prev-btn").click(function(){
			clearInterval(timer);
			clearTimeout(timer2);
			num++;
			num = (num ==$(".banner-nav-wrapper .banner-nav a").length) ? 0 : num ;
			$(".slider ul li").eq(num ).fadeIn(500).siblings("li").fadeOut(500);
			$(".banner-nav-wrapper .banner-nav a").eq(num ).addClass("current").siblings("a").removeClass("current");
			
		});

	});

